package com.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.dao.AwardCaseDao;
import com.entity.AwardCaseEntity;
import com.entity.vo.AwardCaseVo;
import com.service.AwardCaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author mgl
 * @version 1.0
 * @description 获奖情况业务层 实现类
 * @date 2024/4/10 15:33
 */
@Service
public class AwardCaseServiceImpl extends ServiceImpl<AwardCaseDao, AwardCaseEntity> implements AwardCaseService {

    @Autowired
    private AwardCaseDao awardCaseDao;

    @Override
    public List<AwardCaseVo> selectAll(Map<String,Object> map) {
        if (map == null) return awardCaseDao.selectAll();
        return awardCaseDao.selectAllMap(map);
    }

    @Override
    public List<AwardCaseVo> selectByStudentId(Integer studentId, Map<String,Object> map) {
        if (map == null) return awardCaseDao.selectListByStudentId(studentId);
        return awardCaseDao.selectListByStudentIdMap(studentId, map);
    }

    @Override
    public List<AwardCaseVo> selectListModified(Map<String, Object> map) {
        return awardCaseDao.selectListModified(map);
    }
}
